package com.cbl.v.ssczs.view.adapter;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;

import com.cbl.v.ssczs.R;

import java.util.List;

import butterknife.BindView;
import butterknife.ButterKnife;

/**
 * Created by 王凡 on 2017/8/27.
 */

public class BallAdapter extends MyBaseAdapter<String> {

    public BallAdapter(Context context, List<String> list) {
        super(context, list);
    }

    @Override
    public View getView(int position, View convertView, ViewGroup parent) {
        ViewHolder holder;
        if (convertView == null) {
            convertView = LayoutInflater.from(getContext()).inflate(R.layout.ball_item_layout, null);
            holder = new ViewHolder(convertView);
            convertView.setTag(holder);
        } else {
            holder = (ViewHolder) convertView.getTag();
        }
        final String number=dataList.get(position);
        holder.tvNumber.setText(number);
        return convertView;
    }


    class ViewHolder {
        @BindView(R.id.tv_number)
        TextView tvNumber;

        public ViewHolder(View view) {
            ButterKnife.bind(this, view);
        }
    }


}
